Open
Conversation
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@548e586 Filtered ref: rust-lang/rust-analyzer@aea42e3 Upstream diff: rust-lang/rust@e7d4414...548e586 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Configure flycheck using workspace.discoverConfig
fix: Fixes for builtin derive expansions
Fix not disable string escape highlights
feat: Allow rust paths in symbol search
Fix loses exists guard for move_guard
Fix not applicable on statement for convert_to_guarded_return
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 94a0cd15f5976fa35e5e6784e621c04e9f958e57 Filtered ref: 1b46aa0fdb1e825363174ce509e40466cc0af416 Upstream diff: rust-lang/rust@004d710...94a0cd1 This merge was created using https://github.com/rust-lang/josh-sync.
minor: Sync from downstream
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@ba284f4 Filtered ref: rust-lang/rust-analyzer@374c09e Upstream diff: rust-lang/rust@94a0cd1...ba284f4 This merge was created using https://github.com/rust-lang/josh-sync.
fix: Handle `Self::EnumVariant` and `Self` on traits in doclinks
fix: complete inferred type in static
fix: Fix a panic where an opaque was constrained to an impossible type in method autoderef
Rustc pull update
fix: Fix diagnostics being leaked when diagnostics panic
feat: Implement support for `feature(new_range)`
Support else-branch for move_guard
…ostcard-test Fix linking of postcard test
…fetime migrate introduce_named_lifetime assist to SyntaxEditor
Fix complete semicolon in array expression
Fix incorrect Self path expand for inline_call
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1396514 Filtered ref: rust-lang/rust-analyzer@3efb0c2 Upstream diff: rust-lang/rust@ba284f4...1396514 This merge was created using https://github.com/rust-lang/josh-sync.
minor: Rustc pull update
…-impl-to-use-astnodeedit migrate generate_impl assist to use AstNodeEdit
internal: Refactor handling of associated type shorthand for type parameters, i.e. `T::AssocType` without specifying the trait
fix: Fix predicates of builtin derive traits with two parameters defaulting to `Self`
fix: complete derive helpers on empty nameref
fix: no complete suggest param in complex pattern
fix: complete `.let` on block tail prefix expression
Collaborator
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1174f78 Filtered ref: rust-lang/rust-analyzer@60f1aea Upstream diff: rust-lang/rust@eda4fc7...1174f78 This merge was created using https://github.com/rust-lang/josh-sync.
Suggest using equality comparison instead of pattern matching on non-structural constant in pattern
When encountering a pattern containing a non-structural constant (not marked as `#[derive(PartialEq)]` to make it suitable for pattern matching, `C` in the examples below), we would previously not provide additional guidance. With this PR, the `help` in the following examples are added:
```
error: constant of non-structural type `partial_eq::S` in a pattern
--> $DIR/suggest_equality_comparison_instead_of_pattern_matching.rs:16:18
|
LL | struct S;
| -------- `partial_eq::S` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
...
LL | const C: S = S;
| ---------- constant defined here
...
LL | Some(C) => {}
| ^ constant of non-structural type
|
note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
--> $DIR/suggest_equality_comparison_instead_of_pattern_matching.rs:5:5
|
LL | impl PartialEq<S> for S {
| ^^^^^^^^^^^^^^^^^^^^^^^
help: add a condition to the match arm checking for equality
|
LL - Some(C) => {}
LL + Some(binding) if binding == C => {}
|
```
```
error: constant of non-structural type `partial_eq::S` in a pattern
--> $DIR/suggest_equality_comparison_instead_of_pattern_matching.rs:22:18
|
LL | struct S;
| -------- `partial_eq::S` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
...
LL | const C: S = S;
| ---------- constant defined here
...
LL | let Some(C) = Some(S) else { return; };
| ^ constant of non-structural type
|
note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
--> $DIR/suggest_equality_comparison_instead_of_pattern_matching.rs:5:5
|
LL | impl PartialEq<S> for S {
| ^^^^^^^^^^^^^^^^^^^^^^^
help: check for equality instead of pattern matching
|
LL - let Some(C) = Some(S) else { return; };
LL + if Some(C) == Some(S) { return; };
|
```
The suggestion accounts for a few conditions:
- if the type is not from the local crate and has no `PartialEq` impl, the user can't make it structural, so we don't provide the suggestion
- regardless of whether the type is local or remote, if it has a manual `PartialEq`, explain that with a derived `PartialEq` you could use equality
- if the type is local and has no impl, suggest adding a derived `PartialEq` and use equality check instead of pattern matching
- when suggesting equality, account for `if-let` to suggest chaining (edition dependent), `match` arm with a present `if` check, `match` arm without an existing `if` check
- when encountering `let-else`, we suggest turning it into an `if` expression instead (this doesn't check for additional bindings beyond the constant, which would suggest incorrect code in some more complex cases).
Fix rust-lang/rust#42753.
minor: Rustc pull update
…rom-new-to-syntax-editor internal: Migrate `generate_default_from_new` assist to `SyntaxEditor`
fix: wrap ty-anchor in non-path type constuctor
…isplay fix: Correct Display label for Event::FetchWorkspaces
constify `Step` trait and all of its `impl`ementations constifying [Step](rust-lang/rust#42168) trait and all of its implementations, with some friendly help from [const_cmp](rust-lang/rust#143800)
…RalfJung Merge `fabsf16/32/64/128` into `fabs::<F>` Following [a small conversation on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Float.20intrinsics/with/521501401) (and because I'd be interested in starting to contribute on Rust), I thought I'd give a try at merging the float intrinsics :) This PR just merges `fabsf16`, `fabsf32`, `fabsf64`, `fabsf128`, as it felt like an easy first target. Notes: - I'm opening the PR for one intrinsic as it's probably easier if the shift is done one intrinsic at a time, but let me know if you'd rather I do several at a time to reduce the number of PRs. - Currently this PR increases LOCs, despite being an attempt at simplifying the intrinsics/compilers. I believe this increase is a one time thing as I had to define new functions and move some things around, and hopefully future PRs/commits will reduce overall LoCs - `fabsf32` and `fabsf64` are `#[rustc_intrinsic_const_stable_indirect]`, while `fabsf16` and `fabsf128` aren't; because `f32`/`f64` expect the function to be const, the generic version must be made indirectly stable too. We'd need to check with T-lang this change is ok; the only other intrinsics where there is such a mismatch is `minnum`, `maxnum` and `copysign`. - I haven't touched libm because I'm not familiar with how it works; any guidance would be welcome!
…ski,antoyo simd_fmin/fmax: make semantics and name consistent with scalar intrinsics This is the SIMD version of rust-lang/rust#153343: change the documented semantics of the SIMD float min/max intrinsics to that of the scalar intrinsics, and also make the name consistent. The overall semantic change this amounts to is that we restrict the non-determinism: the old semantics effectively mean "when one input is an SNaN, the result non-deterministically is a NaN or the other input"; the new semantics say that in this case the other input must be returned. For all other cases, old and new semantics are equivalent. This means all users of these intrinsics that were correct with the old semantics are still correct: the overall set of possible behaviors has become smaller, no new possible behaviors are being added. In terms of providers of this API: - Miri, GCC, and cranelift already implement the new semantics, so no changes are needed. - LLVM is adjusted to use `minimumnum nsz` instead of `minnum`, thus giving us the new semantics. In terms of consumers of this API: - Portable SIMD almost certainly wants to match the scalar behavior, so this is strictly a bugfix here. - Stdarch mostly stopped using the intrinsic, except on nvptx, where arguably the new semantics are closer to what we actually want than the old semantics (#2056). Q: Should there be an `f` in the intrinsic name to indicate that it is for floats? E.g., `simd_fminimum_number_nsz`? Also see rust-lang/rust#153395.
…acrum triagebot: add reminder for bumping CI LLVM stamp I'm not sure what else can be done automatically to help us not forget this, but at least this gives a chance for the PR author/reviewer to be reminded (e.g. myself).
…t-dist-x86_64, r=marcoieni Fix LegacyKeyValueFormat report from docker build: dist-x86_64 Part of rust-lang/rust#152305 r? @marcoieni
…-Simulacrum `trim_prefix` for paths under rust-lang/rust#142312? its a useful method.
Fix ice in rustdoc of private reexport Fixes rust-lang/rust#154383 The root cause is rustdoc could still try to resolve links for source docs that resolver did not cache in `ResolveDocLinks::Exported` mode. The test case will not crash with `--document-private-items` option, which will use `ResolveDocLinks::All`. The fix makes rustdoc skip link resolution based on the source `DefId` of each doc fragment, so its behavior stays aligned with resolver's logic here: https://github.com/chenyukang/rust/blob/dc5cb1719eed6ac9275fe93d914d32141606b2ac/compiler/rustc_resolve/src/late.rs#L685
move many tests from `structs-enums` to `structs` or `enum` This PR moves most of the tests in `ui/structs-enums` that are only about structs or only about enums to their respective directory, as a step towards removing `ui/structs-enums`. Followup to rust-lang/rust#154131. r? @Kivooeo
Notify stdarch maintainers on changes in std_detect cc @Amanieu @folkertdev @Kobzol It would be nice to be notified when std_detect changes, as it is spiritually a part of stdarch. Also assign @rust-lang/libs to std_detect
Rollup of 9 pull requests Successful merges: - rust-lang/rust#153380 (stabilize new RangeFrom type and iterator) - rust-lang/rust#153834 (Merge `fabsf16/32/64/128` into `fabs::<F>`) - rust-lang/rust#154043 (simd_fmin/fmax: make semantics and name consistent with scalar intrinsics) - rust-lang/rust#154494 (triagebot: add reminder for bumping CI LLVM stamp) - rust-lang/rust#153374 (Fix LegacyKeyValueFormat report from docker build: dist-x86_64) - rust-lang/rust#154320 (`trim_prefix` for paths) - rust-lang/rust#154453 (Fix ice in rustdoc of private reexport) - rust-lang/rust#154504 (move many tests from `structs-enums` to `structs` or `enum`) - rust-lang/rust#154515 (Notify stdarch maintainers on changes in std_detect)
…ors/code/multi-bf05dc1ecf Bump picomatch in /editors/code
Make typeck a tcx method which calls typeck_root query Currently typeck query itself calls `tcx.typeck(tcx.typeck_root_def_id(key))` if its key isn't a type-check root. I thought this might be an overhead and made typeck a tcx method which calls typeck_root query instead. This is a step to simplify `cache_on_disk_if` query modifier. @petrochenkov please run perf
[perf] Revert FastISel patch This caused a significant compile-time regression for debug builds. There is another change (llvm/llvm-project#186723) that mitigates that regression, but not fully. Revert it for now.
317cb71 to
3e026ee
Compare
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@f1297b2. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Properly generalize unevaluated consts - fixes rust-lang/rust#153831 - fixes a `// FIXME(ogca)` (I am unaware of an issue for this) added in rust-lang/rust#150823 r? @BoxyUwU
folkertdev
approved these changes
Mar 31, 2026
added 2 commits
March 31, 2026 15:48
This updates the rust-version file to e4fdb554ad2c0270473181438e338c42b5b30b0c.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@e4fdb55 Filtered ref: ae05da8 Upstream diff: rust-lang/rust@eda4fc7...e4fdb55 This merge was created using https://github.com/rust-lang/josh-sync.
3e026ee to
6c4d129
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Latest update from rustc.